// @ts-ignore
/* eslint-disable */
import request from '@/utils/request.ts'

/** 此处后端没有提供注释 DELETE /userTest/${param0} */
export async function deleteTest(
  // 叠加生成的Param类型 (非body参数swagger默认没有生成对象)
  params: API.deleteTestParams,
  options?: { [key: string]: any }
) {
  const { testId: param0, ...queryParams } = params
  return request<API.BaseResponseObject>(`/userTest/${param0}`, {
    method: 'DELETE',
    params: { ...queryParams },
    ...(options || {}),
  })
}

/** 此处后端没有提供注释 GET /userTest/detail/${param0} */
export async function detail(
  // 叠加生成的Param类型 (非body参数swagger默认没有生成对象)
  params: API.detailParams,
  options?: { [key: string]: any }
) {
  const { testId: param0, ...queryParams } = params
  return request<API.BaseResponseObject>(`/userTest/detail/${param0}`, {
    method: 'GET',
    params: { ...queryParams },
    ...(options || {}),
  })
}

/** 此处后端没有提供注释 GET /userTest/list */
export async function list(
  // 叠加生成的Param类型 (非body参数swagger默认没有生成对象)
  params: API.listParams,
  options?: { [key: string]: any }
) {
  return request<API.BaseResponseObject>('/userTest/list', {
    method: 'GET',
    params: {
      ...params,
    },
    ...(options || {}),
  })
}

/** 此处后端没有提供注释 POST /userTest/submit */
export async function submitTest(body: API.UserTestSubmitDTO, options?: { [key: string]: any }) {
  return request<API.BaseResponseObject>('/userTest/submit', {
    method: 'POST',
    headers: {
      'Content-Type': 'application/json',
    },
    data: body,
    ...(options || {}),
  })
}
